package com.wfcm.service;

import java.math.BigDecimal;
import java.util.List;
import java.util.Map;

import javax.servlet.http.HttpServletRequest;

import com.alibaba.fastjson.JSONObject;
import com.wfcm.entity.WfGoodsOrderEntity;

/**
 * 订单表管理
 * 
 * @author xlf
 * @email xlfbe696@gmail.com
 * @date 2018-01-22 18:57:19
 */
public interface WfGoodsOrderService {
	
	WfGoodsOrderEntity queryObject(Integer id);
	//根据订单号获取相关订单
	WfGoodsOrderEntity  queryByOrderCode(String orderCode);
		
	List<WfGoodsOrderEntity>  queryByUserId(Integer id);

	WfGoodsOrderEntity  queryByCollageId(Map<String, Object> map);

	List<WfGoodsOrderEntity>  queryMyOrder(Map<String, Object> map);
	
	List<WfGoodsOrderEntity> queryList(Map<String, Object> map);
	
	int queryTotal(Map<String, Object> map);
	//获取待付款个数
	int queryNoPay(Map<String, Object> map);
	//获取已付款个数
	int queryAlreadyPay(Map<String, Object> map);
	
	void save(WfGoodsOrderEntity wfGoodsOrder);
	
	void update(WfGoodsOrderEntity wfGoodsOrder);
	
	void delete(Integer id);
	
	void deleteBatch(Integer[] ids);
	
	JSONObject dopay(HttpServletRequest request, String orderNum, BigDecimal actualPrice, Integer orderType) throws Exception;
	
	JSONObject ggdopay(HttpServletRequest request, String orderNum, BigDecimal actualPrice, Integer orderType,String openid)throws Exception; 
	
	JSONObject doQuery(HttpServletRequest request, String orderNum, BigDecimal actualPrice, Integer orderType) throws Exception;
	
	WfGoodsOrderEntity queryByTransactionId(String transactionId);
	
	WfGoodsOrderEntity queryOrderUser(String orderCode);

	Integer queryAlreadyPayByUserId(Integer userId);
	
}
